home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Zoom 2
/
Zoom - Release 2 (1996)(Active Software)[!].iso
/
texts
/
amoszine
/
source
/
ag_exe_in_amos.amos
/
ag_exe_in_amos.amosSourceCode
Wrap
AMOS Source Code
|
1992-09-02
|
4KB
|
178 lines
' *** Right here is the example on how to save exe files inside your Amos
' *** listings. (and how to run them)
' *** Idea by : Steve (I'm no lamer ya know) Bye
' *** Author : Andy (maybe not Steve, but it's an oldie) Gibson
' *** distributed via Amoszine Issue #7 for all to share.
' *** Should run on all versions of Amos, but I have included some Pro
' *** commands at the end (all commented out to keep this compatible)
' *** Remove all the Wait 70 and Centre "xxx" etc to make this run
' *** a hell of a lot faster ! I've just included all the crap so you
' *** can see "on-screen" what is going on.
' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
' *** Open a screen to display information on...
Screen Open 0,640,200,4,Hires : Curs Off : Flash Off
Palette $0,$F00,$FF0,$F0
Cls 0 : Paper 0 : Pen 1
' *** Remove this later ...
Locate 0,10 : Cline
Centre "Checking Bank for PPmore"
Wait 70
' *** Check length of bank 10. If it's empty then we shall load in
' *** PPMore.
If Length(10)=0
' *** Remove this later ...
Locate 0,10 : Cline
Centre "Loading PPMore from disk"
Wait 70
FILE$="Amoszine_Issue_Seven:C/PPMore"
Open In 1,FILE$
FILE_LENGTH=Lof(1)
Close 1
Reserve As Chip Data 10,FILE_LENGTH
Bload FILE$,10
End If
' *** Remove this later ...
Locate 0,10 : Cline
Centre "PPmore now in bank 10"
Wait 70
Locate 0,10 : Pen 2 : Cline
Centre "Saving PPmore to Ram:"
Wait 70
' *** Save the bank to ram:
Bsave "ram:ppmore",Start(10) To Start(10)+Length(10)
' *** remove this later ...
Locate 0,10 : Pen 3 : Cline
Centre "Goint to Wbench now"
Wait 70
' *** Get rid of Amos display
Amos To Back
' *** Right - Doscall time to run ppmore - Amos Pro users, please see
' *** below for a simpler method you can use.
COMMAND$="ram:ppmore amoszine_issue_seven:Extractor.doc"
Dreg(1)=Varptr(COMMAND$)
Dreg(2)=0
Dreg(3)=0
XEXECUTE=Doscall(-222)
' *** Bring back Amos
Amos To Front
' *** Remove this later ...
Locate 0,10 : Pen 3 : Cline
Centre "Hello I'm back again !!!"
Wait 100
' *** Just get back to the editor here
Edit
' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
' *** Right all you Amos Pro users, this is the way in which I normally
' *** call exe progs. I think you require the RUN command in your C
' *** Dir (only kickstart 1.3 users though). It's simple and easy and
' *** no nasty Doscalls either !!! In fact this is the Lamer way to
' *** do things I guess, so why didn't Steve come up with this 'un ?
' ******** AMOS PRO EASY WAY OF DOING THE EXACT SAME THING !!! **********
' *** Get rid of Amos display
Amos To Back
' *** exec ppmore from amos pro (please remove the REM)
Rem Exec "ram:ppmore amoszine_issue_seven:extractor.doc"
' *** Bring back Amos
Amos To Front
Edit
' ***********************************************************************
' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
' *** Please note that if you are still living in the dark ages and use
' *** Kickstart 1.3, then you MUST have the RUN command in your C Dir
' *** before any of the above examples will work 100% !!!
' *** Upgrade folks please as its a pain trying to keep everything
' *** compatible with the older systems. ;)
' ***
' *** PPMore also requires PowerPacker.Library and Reqtools.Library in
' *** your Libs: Dir of your Boot Disk.
' ***
' *** Steve informs me that you MUST reserve as CHIP DATA or the compiler
' *** won't compile your proggy ! I have not had this problem yet, but
' *** better to be safe than sorry.
' ***
' *** If you do ever get the compiler saying ... NOT AN AMOS PROGRAM
' *** then just save your work, Quit Amos and load it back up and try
' *** again. That may solve the solution ! :)
' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-